modified_info = create_modified_file_info (child_info, modifier);
- xattrs = ostree_get_xattrs_for_file (dir, error);
- if (!xattrs)
- goto out;
+ if (!(modifier && modifier->skip_xattrs))
+ {
+ xattrs = ostree_get_xattrs_for_file (dir, error);
+ if (!xattrs)
+ goto out;
+ }
if (!stage_directory_meta (self, modified_info, xattrs, &child_file_checksum,
cancellable, error))
goto out;
}
- xattrs = ostree_get_xattrs_for_file (child, error);
- if (!xattrs)
- goto out;
+ if (!(modifier && modifier->skip_xattrs))
+ {
+ xattrs = ostree_get_xattrs_for_file (child, error);
+ if (!xattrs)
+ goto out;
+ }
if (!stage_object_impl (self, OSTREE_OBJECT_TYPE_RAW_FILE,
modified_info, xattrs, file_input, NULL,
static char **metadata_strings;
static gboolean skip_if_unchanged;
static gboolean tar_autocreate_parents;
+static gboolean no_xattrs;
static char **trees;
static gint owner_uid = -1;
static gint owner_gid = -1;
{ "tree", 0, 0, G_OPTION_ARG_STRING_ARRAY, &trees, "Overlay the given argument as a tree", "NAME" },
{ "owner-uid", 0, 0, G_OPTION_ARG_INT, &owner_uid, "Set file ownership user id", "UID" },
{ "owner-gid", 0, 0, G_OPTION_ARG_INT, &owner_gid, "Set file ownership group id", "GID" },
+ { "no-xattrs", 0, 0, G_OPTION_ARG_NONE, &no_xattrs, "Do not import extended attributes", NULL },
{ "tar-autocreate-parents", 0, 0, G_OPTION_ARG_NONE, &tar_autocreate_parents, "When loading tar archives, automatically create parent directories as needed", NULL },
{ "skip-if-unchanged", 0, 0, G_OPTION_ARG_NONE, &skip_if_unchanged, "If the contents are unchanged from previous commit, do nothing", NULL },
{ NULL }
set -e
-echo "1..22"
+echo "1..23"
. libtest.sh
assert_file_has_content test2-commit-text "'FOO'.*'BAR'"
assert_file_has_content test2-commit-text "'KITTENS'.*'CUTE'"
echo "ok metadata commit with strings"
+
+cd ${test_tmpdir}/checkout-test2-4
+$OSTREE commit -b test2 -s "no xattrs" --no-xattrs
+echo "ok commit with no xattrs"